<html>
 <head>
  <link href="./leetcode-problem.css" rel="stylesheet" type="text/css">
 </head>
 <body>
  <div class="question_difficulty">
   难度：Hard
  </div>
  <div>
   <h1 class="question_title">
    564. Find the Closest Palindrome
   </h1>
   <p>
    Given an integer n, find the closest integer (not including itself), which is a palindrome.
   </p>
   <p>
    The 'closest' is defined as absolute difference minimized between two integers.
   </p>
   <p>
    <b>
     Example 1:
    </b>
    <br>
   </p>
   <pre>
<b>Input:</b> "123"
<b>Output:</b> "121"
</pre>
   <p>
    <b>
     Note:
    </b>
    <br>
   </p>
   <ol>
    <li>
     The input
     <b>
      n
     </b>
     is a positive integer represented by string, whose length will not exceed 18.
    </li>
    <li>
     If there is a tie, return the smaller one as answer.
    </li>
   </ol>
  </div>
  <div>
   <h1 class="question_title">
    564. 寻找最近的回文数
   </h1>
   <p>
    给定一个整数 n ，你需要找到与它最近的回文数（不包括自身）。
   </p>
   <p>
    &ldquo;最近的&rdquo;定义为两个整数
    <strong>
     差的绝对值
    </strong>
    最小。
   </p>
   <p>
    <strong>
     示例 1:
    </strong>
   </p>
   <pre>
<strong>输入:</strong> "123"
<strong>输出:</strong> "121"
</pre>
   <p>
    <strong>
     注意:
    </strong>
   </p>
   <ol>
    <li>
     <strong>
      n
     </strong>
     是由字符串表示的正整数，其长度不超过18。
    </li>
    <li>
     如果有多个结果，返回最小的那个。
    </li>
   </ol>
  </div>
 </body>
</html>